Updating documentation

You should update your documentation files whenever you have:

- added symbols to source files
- renamed symbols in source files
- deleted symbols from source files
- moved symbols from one source file to another that is either in the same project or a different one

To update your documentation file, choose Documentation Synchronizer... in the Documentation Editor's Info menu. The Documentation Synchronization dialog appears.
(For a detailed description of the Documentation Synchronization dialog, please refer to Documentation Synchronizer. In this section, we will just discuss the update process.)

Updating documentation -- procedures
(Unless otherwise stated, all the commands referred to below are to be executed in the Documentation Synchronization dialog.)
A symbol is added to the source code
When you add a symbol to one of your source files, you will have to generate a documentation frame for it in the source file's corresponding documentation file.

- Select the source file from the File List and then choose the Synchronize Documentation of Selected Files command from the Synchronize menu.
SNiFF+ generates a documentation frame for the symbol in the corresponding documentation file of the selected source file.

A symbol is renamed in the source code
When you rename a symbol in a source file, you will have to generate a new documentation frame for the renamed symbol in the source file's corresponding documentation file.
The original symbol no longer exists in SNiFF+'s Symbol Table. As a result, it becomes obsolete when you synchronize the source file with its corresponding documentation file.
You can then paste the contents of the original (now obsolete) symbol's documentation frame into the newly generated documentation frame and then delete the obsolete symbol's documentation frame from the documentation file.

To generate a new documentation frame for the renamed symbol and make the original symbol obsolete, select the source file from the File List and then choose the Synchronize Documentation of Selected Files command from the Synchronize menu.
A documentation frame is generated for the renamed symbol in the source file's corresponding documentation file.
The original (now obsolete) symbol is displayed in italics in the Documentation Editor and in the Documentation Synchronization dialog.
To copy the contents of the original (now obsolete) symbol's documentation frame into the newly generated documentation frame, select the obsolete symbol from the Symbol List and then choose the Matching Symbols for Obsolete Symbol command from the Synchronize menu.
Alternatively, you can use the Copy and Paste commands in the Edit menu.
To delete the obsolete symbol's documentation frame from the documentation file, select the obsolete symbol from the Symbol List and then choose the Delete command from the Edit menu.

A symbol is deleted from the source code
A symbol that is deleted from your source code no longer exists in SNiFF+'s Symbol Table. As a result, it becomes obsolete when you update the source file's corresponding documentation file.

To make the deleted symbol obsolete, select the source file from the File List and then choose the Synchronize Documentation of Selected Files command from the Synchronize menu.
The deleted (now obsolete) symbol is displayed in italics in the Documentation Editor and in the Documentation Synchronization dialog.
To delete the obsolete symbol's documentation frame from the documentation file, select the obsolete symbol from the Symbol List and then choose the Delete command from the Edit menu.
The obsolete symbol's documentation frame disappears from the documentation file.

Symbols are moved to another file
You can move symbols and their documentation from one file to another. These files can be in the same project or in two different ones.
You can move documentation from one documentation file to another by using the Copy and Paste commands in the Edit menu. But before you can do this, you will have to generate a documentation frame for the symbol in the new source file's corresponding documentation file.
After you have moved the documentation, you can delete the symbol's documentation frame in the original documentation file.

To generate a documentation frame for the moved symbol in its new source file's corresponding documentation file, select the new source file from the File List and then choose the Synchronize Documentation of Selected Files command from the Synchronize menu.
A documentation frame is generated for the moved symbol in the new source file's corresponding documentation file.
To move documentation from the original documentation file to the new documentation file:
Select the original source file from the File List and then the moved symbol from the Symbol List.
Choose the Copy command from the Edit menu.
Select the new documentation file from the File List and then the moved symbol from the Symbol List.
Choose the Paste command from the Edit menu.
The documentation for the moved symbol now exists in both the original documentation file and in the new documentation file.
To delete the symbol's documentation frame in the original documentation file:
Select the original source file from the File List and then the moved symbol from the Symbol List.
Choose the Delete command from the Edit menu.
The symbol's documentation frame disappears from the original documentation file.